package request

type LayerListForm struct {
	Page  int `json:"page" form:"page"`
	Limit int `json:"limit" form:"limit"`
}

type AdminForm struct {
	LayerListForm
	Username string `json:"username" form:"username"`
}

type RoleForm struct {
	LayerListForm
	Name string `json:"name" form:"name"`
}

type PurviewForm struct {
	LayerListForm
	Name string `json:"name" form:"name"`
}

type PurviewAddForm struct {
	IsShow int8   `json:"is_show" form:"is_show"`
	Pid    int    `json:"pid" form:"pid"`
	Sort   int    `json:"sort" form:"sort"`
	Name   string `json:"name" form:"name"`
	Url    string `json:"url" form:"url"`
	Icon   string `json:"icon" form:"icon"`

}

type AdminAddForm struct {
	RoleId     int    `json:"role_id" form:"role_id" binding:"required"`
	Username   string `json:"username" form:"username" binding:"required"`
	RealName   string `json:"real_name" form:"real_name" binding:"required"`
	Password   string `json:"password" form:"password" binding:"required"`
	RePassword string `json:"re_password" form:"re_password" binding:"required"`
	Mobile     string `json:"mobile" form:"mobile" binding:"required"`
}

type ArticleForm struct {
	LayerListForm
	Title string `json:"title" form:"title"`
}

type ArticleAddForm struct {
	Title         string `json:"title" form:"title" binding:"required"`
	Desc          string `json:"desc" form:"desc" binding:"required"`
	Content       string `json:"content" form:"content" binding:"required"`
	CoverImage    string `json:"content" form:"cover_image"`
	IsOpenComment int8   `json:"is_open_comment" form:"is_open_comment"`
	IsTop         int8   `json:"is_top" form:"is_top"`
	IsRecommended int8   `json:"is_recommended" form:"is_recommended"`
	CategoryId    []int  `json:"category_id[]" form:"category_id[]"`
}

type CategoryAddForm struct {
	Pid  int    `json:"pid" form:"pid"`
	Sort int    `json:"sort" form:"sort"`
	Name string `json:"name" form:"name"`
}

type CategoryForm struct {
	LayerListForm
	Name string `json:"name" form:"name"`
}